import React, { Component } from "react";
import Father from "./Father";
import { Provider } from "../utils/context";

 class Grand extends Component {
  state = {
    count: 100,
  };
  render() {
    const { count } = this.state;
    return (
      <div>
        <h2>爷爷组件 -- {count}</h2>
        <Provider value = {count}>
          <Father/>
        </Provider>
      </div>
    );
  }
}
export default Grand